﻿using System.Collections.Generic;

namespace WeWork.SDK.Framework.Entitys
{
    /// <summary>
    /// 企业微信实体类
    /// </summary>
    public class CorpInfo
    {
        /// <summary>
        /// 企业微信ID
        /// </summary>
        public string CorpId { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信名称
        /// </summary>
        public string CorpName { set; get; } = string.Empty;
        /// <summary>
        /// 是否使用自建应用
        /// </summary>
        public bool IsUseAgent { set; get; }
        /// <summary>
        /// 企业微信会话内容存档AgentId
        /// </summary>
        public string ChatAgentId { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信会话内容存档Secret
        /// </summary>
        public string ChatSecret { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信客户联系AgentId
        /// </summary>
        public string CustomerAgentId { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信客户联系Secret
        /// </summary>
        public string CustomerSecret { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信自建应用AgentId
        /// </summary>
        public string AgentId { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信自建应用Secret
        /// </summary>
        public string AgentSecret { set; get; } = string.Empty;
        /// <summary>
        /// 企业微信会话内容存档 消息加密公钥对应的私钥列表（版本号，公钥，私钥）
        /// </summary>
        public List<CorpChatEncryptKeys> VerKeys { set; get; } = new List<CorpChatEncryptKeys>();
    }

    /// <summary>
    /// 企业微信 会话内容存档 消息加密 版本号 公钥 私钥
    /// </summary>
    public class CorpChatEncryptKeys
    {
        /// <summary>
        /// 版本号
        /// </summary>
        public int Ver { set; get; }
        /// <summary>
        /// 公钥
        /// </summary>
        public string PublicKey { set; get; } = string.Empty;
        /// <summary>
        /// 私钥
        /// </summary>
        public string PrivateKey { set; get; } = string.Empty;
    }
}
